package com.wikikii.bannerlib.banner;

import com.wikikii.bannerlib.ResourceTable;
import com.wikikii.bannerlib.banner.listener.OnLoadImageViewListener;
import ohos.agp.components.Component;
import ohos.agp.components.LayoutScatter;
import ohos.app.Context;

public abstract class OnDefaultImageViewLoader implements OnLoadImageViewListener {

    @Override
    public Component createImageView(Context context, boolean isScaleAnimation) {
        Component view;
        if (!isScaleAnimation) {
            view = LayoutScatter.getInstance(context).parse(ResourceTable.Layout_item_banner,
                    null, false);
        } else {
            view = LayoutScatter.getInstance(context).parse(ResourceTable.Layout_item_animation_banner,
                    null, false);
        }
        return view;
    }
}
